home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / os2 / lxlt115.zip / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1996-06-19  |  5KB  |  150 lines

  1. /***********************************/
  2. /* lxLite installation script file */
  3. /***********************************/
  4.  '@echo off'
  5.  'cls'
  6.  call rxFuncAdd "SysOS2Ver", "RexxUtil", "SysOS2Ver"
  7.  call rxFuncAdd "SysGetKey", "RexxUtil", "SysGetKey"
  8.  say "═══════ FRIENDS software presents ═══════"
  9.  say "╖  \//        An  OS/2 executables packer"
  10.  say "╜─╜//\  ╖     Lots  of  features, maximal"
  11.  say "  //╖  ╖╫─╓─╖ compression, nice interface"
  12.  say " // ╜─╜╨╙─╙── R·E·L·E·A·S·E V·E·R·S·I·O·N"
  13.  say "═════════════════════════════════════════"
  14.  version = SysOS2Ver()
  15.  parse value version with hiver "." lover
  16.  if (hiver = 2) & (lover > 11)
  17.   then do
  18.         hiver = lover %  10;
  19.         lover = lover // 10;
  20.        end
  21.  say "OS/2 version "hiver"."lover" detected"
  22.  
  23.  say "********************************************************************"
  24.  say "Please enter the destination directory for program, ex: C:\OS2\APPS:"
  25.  pull destDir
  26.  if (length(destDir) > 3) & (substr(destDir, length(DestDir), 1) = "\")
  27.   then destDir = substr(destDir, 1, length(DestDir) - 1);
  28.  do while stream(destDir,"c","query datetime") = ""
  29.   QueryCreate = Ask("The directory you specified does not exist. Create it? (Y/N)", "YN")
  30.   select
  31.    when QueryCreate = "Y"
  32.     then 'mkDir 'destDir' 1>nul 2>nul'
  33.    otherwise
  34.     say "Aborting..."
  35.     exit
  36.   end
  37.  end
  38.  QueryUtility = Ask("Install lxLite utility pack? (Y/N)", "YN");
  39.  
  40.  say "********************************************************************"
  41.  
  42.  if (hiver >= 3)                  /* Repack using Lempel-Ziv for OS/2 v>=2.20 */
  43.   then do
  44.         say "Please wait, repacking lxLite using advanced compression method"
  45.         say "Supported by OS/2 2.99 and above (Warp)"
  46.         'lxLite /yur lxLite.exe'
  47.         'del lxLite2x.cfg 1>nul 2>nul'
  48.        end
  49.   else do
  50.         say "Your OS/2 version does not support Lempel-Ziv compression method"
  51.     'lxLite /x chCase.exe unLock.exe colMng.exe noEA.exe SysIcons.exe'
  52.         'del lxLite.cfg 1>nul 2>nul'
  53.         'ren lxLite2x.cfg lxLite.cfg 1>nul 2>nul'
  54.        end
  55.  
  56.  say "********************************************************************"
  57.  call CopyFile "lxLite.exe"
  58.  call CopyFile("lxLite.cfg")
  59.  call CopyFile("stub_min.bin")
  60.  call CopyFile("stub_vdm.bin")
  61.  call CopyFile("lxLite.eng")
  62.  call CopyFile("lxLite.rus")
  63.  call CopyFile("lxLite.ger")
  64.  if (QueryUtility = "Y")
  65.   then do
  66.     call CopyFile("chCase.exe")
  67.     call CopyFile("colMng.exe")
  68.     call CopyFile("noEA.exe")
  69.     call CopyFile("unLock.exe")
  70.     call CopyFile("SysIcons.exe")
  71.     call CopyFile("AndyCols.ini")
  72.     call CopyFile("lxUtil.eng")
  73.     call CopyDir ("AndyPtrs")
  74.     call CopyDir ("AndyB&W")
  75.     call CopyDir ("WGloves")
  76.        end
  77.  say "********************************************************************"
  78.  if Ask("Installation complete. Do you want to read the WHATSNEW file now?", "YN") = "Y"
  79.   then do
  80.         'cls'
  81.         'type whatsnew | more'
  82.         Ask("Press Space to continue", " ")
  83.     'cls'
  84.        end
  85.  if Ask("Do you wish to clean the install source directory? (Y/N)", "YN") = "Y"
  86.   then do
  87.         say "Please wait, cleaning up ..."
  88.         'del lxLite??.* 1>nul 2>nul'
  89.         'del chCase*.* 1>nul 2>nul'
  90.         'del noEA*.* 1>nul 2>nul'
  91.         'del colMng*.* 1>nul 2>nul'
  92.         'del unLock*.* 1>nul 2>nul'
  93.         'del SysIcons*.* 1>nul 2>nul'
  94.         'del lxUtil*.* 1>nul 2>nul'
  95.         'del stub_*.* 1>nul 2>nul'
  96.         'del AndyCols.ini 1>nul 2>nul'
  97.         'del whatsnew 1>nul 2>nul'
  98.         'del file_id.diz 1>nul 2>nul'
  99.         'del upload.tem* 1>nul 2>nul'
  100.         'echo Y | del "AndyB&W" 1>nul 2>nul'
  101.         'rmdir "AndyB&W"'
  102.         'echo Y | del "AndyPtrs" 1>nul 2>nul'
  103.         'rmdir "AndyPtrs"'
  104.         'echo Y | del "WGloves" 1>nul 2>nul'
  105.         'rmdir "WGloves"'
  106.         if Ask("Do you want to remove directory with lxLite sources? (Y/N)", "YN") = "Y"
  107.          then do
  108.                'echo Y | del "Sources\Common" 1>nul 2>nul'
  109.                'echo Y | del "Sources\RTL" 1>nul 2>nul'
  110.                'echo Y | del "Sources\SysIcons" 1>nul 2>nul'
  111.                'rmdir "Sources\Common"'
  112.                'rmdir "Sources\RTL"'
  113.                'rmdir "Sources\SysIcons"'
  114.                'echo Y | del "Sources" 1>nul 2>nul'
  115.                'rmdir "Sources"'
  116.               end
  117.         'attrib -r install.cmd 1>nul 2>nul'
  118.         'del install.cmd 1>nul 2>nul'
  119.        end
  120.  say "              Just another fine product from"
  121.  say "                    ╖──────────────╖──╖"
  122.  say "                    ║─╖╖─╖╖╓─╖╖─╖╓─╢╓──"
  123.  say "                    ╜  ╜  ╨╙──╜ ╙╙─╙──╜"
  124.  say "                      s·o·f·t·w·a·r·e"
  125.  say "To contact me, write to: Andrew Zabolotny, 2:5030/84.5@FIDOnet"
  126.  say "                 e-mail: bit@freya.etu.ru"
  127. exit
  128.  
  129. CopyFile:
  130.  arg fName
  131.  say "Copying "fName" -> "destDir"\"fName
  132.  'copy 'fName destDir' 1>nul 2>nul'
  133. return
  134.  
  135. CopyDir:
  136.  arg dName
  137.  say "Copying "dName"\ -> "destDir"\"dName"\"
  138.  'xcopy /e "'dName'" "'destDir'\'dName'"\ 1>nul 2>nul'
  139. return
  140.  
  141. Ask:
  142.  parse arg Question,Reply
  143.  rc = charOut(, Question)
  144.  do until Pos(Answer, Reply) \= 0
  145.   KeyIn = SysGetKey("noecho")
  146.   parse upper var KeyIn Answer
  147.  end
  148.  say Answer
  149. return Answer
  150.